import { axios } from '@/utils/request'

export function fetchList(query) {
    return axios({
        url: '/yjsh/shopperson/page',
        method: 'get',
        params: query
    })
}

export function addObj(obj) {
    return axios({
        url: '/yjsh/shopperson',
        method: 'post',
        data: obj
    })
}

export function getObj(id) {
    return axios({
        url: '/yjsh/shopperson/' + id,
        method: 'get'
    })
}

export function updateState(obj) {
    return axios({
        url: '/yjsh/shopperson/updateState',
        method: 'put',
        data: obj
    })
}

export function putObj(obj) {
    return axios({
        url: '/yjsh/shopperson',
        method: 'put',
        data: obj
    })
}

export function profitrule(query) {  //佣金规则
    return axios({
        url: '/yjsh/profitrule/page',
        method: 'get',
        params: query
    })
}
